<script>
 function changeIFrame()
	{
		var frameEl = window.frameElement;
		// If we are inside a frame, then change its URL to 'http://mozilla.org/'
		if (frameEl) {
		  frameEl.src = 'iframe-close.html';
		}
	}
 </script>
 
<input type="button" value="Change content of frame" onclick="changeIFrame()">
